//
//  SerialPostLocationView.m
//  XPhoto
//
//  Created by sentinel on 2020/4/9.
//  Copyright © 2020 baboy. All rights reserved.
//

#import "SerialPostLocationView.h"
@interface SerialPostLocationView()
@end
@implementation SerialPostLocationView
- (void)reload{
    [self layoutSerialGroupView];
    self.tableView.tableFooterView = [UIView new];
    SysDictItem *dictItem = [SysDict itemForValue:[@(SERIAL_TYPE_LOCATION) description] dictKey:SYS_DICT_SERIAL_TYPE_KEY];
    self.serialGroupView.title = dictItem?dictItem.title:nil;
    self.serialGroupView.selectedIndex = 0;
    [self search:0];
    
    self.contentScrollView.layer.borderWidth = 2;
    self.contentScrollView.layer.borderColor = [UIColor redColor].CGColor;
}
- (void)addPosts:(NSArray*)posts{
    NSMutableArray *groups = [Post locationSerialGroup:self.groups withPhotoRecords:posts];
    self.groups = groups;
    self.serialGroupView.items = groups;
    self.photoMapView.items = self.posts;
    [self.tableView reloadData];
}
@end
